﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Bids.Core.Common.Net
{
    public class UrlHelper
    {
        private static string _SiteUrl;
        private static string _MemUrl;
        private static string _BtcUrl;
        private static StringBuilder _StringBuilder; 
        static UrlHelper()
        {
            _SiteUrl = "http://static.btcle.com";
            _MemUrl = "http://member.btcle.com";
            _BtcUrl = "http://btcle.com";
        }
        public static string StaticSite
        {
            get { return _SiteUrl; }
        }
        public static string MemberSite
        {
            get { return _MemUrl; }
        }
        public static string BtcSite
        {
            get { return _BtcUrl; }
        }
        /// <summary>
        /// css
        /// </summary>
        public static string GetCss(string file)
        {
            _StringBuilder = new StringBuilder(_SiteUrl);
            _StringBuilder = _StringBuilder.Append("/css/");
            _StringBuilder = _StringBuilder.Append(file);

            return _StringBuilder.ToString();

        }
        /// <summary>
        /// 图片
        /// </summary>
        public static string GetImage(string file)
        {
            _StringBuilder = new StringBuilder(_SiteUrl);
            _StringBuilder = _StringBuilder.Append("/images/");
            _StringBuilder = _StringBuilder.Append(file);

            return _StringBuilder.ToString();


        }
        /// <summary>
        /// js
        /// </summary>
        public static string GetJs(string file)
        {
            _StringBuilder = new StringBuilder(_SiteUrl);
            _StringBuilder = _StringBuilder.Append("/js/");
            _StringBuilder = _StringBuilder.Append(file);

            return _StringBuilder.ToString();


        }
        /// <summary>
        /// 插件
        /// </summary>
        public static string GetPlugin(string file)
        {
            _StringBuilder = new StringBuilder(_SiteUrl);
            _StringBuilder = _StringBuilder.Append("/plug-ins/");
            _StringBuilder = _StringBuilder.Append(file);

            return _StringBuilder.ToString();


        }
        /// <summary>
        /// 管理后台相关
        /// </summary>
        public static string GetAdmin(string file)
        {
            _StringBuilder = new StringBuilder(_SiteUrl);
            _StringBuilder = _StringBuilder.Append("/admin/");
            _StringBuilder = _StringBuilder.Append(file);

            return _StringBuilder.ToString();

        }
        /// <summary>
        /// 图片上传站点
        /// </summary>
        public static string ImageServer
        {
            get
            {
                return ConfigurationManager.AppSettings["ImageServer"];
            }
        }
    }
}
